package com.ty.skysystem.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.ty.common.validator.group.SaveGroup;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

/**
 * 车辆司机关联表: 用于连接车辆与驾驶员 字段名: truck_id => 对应表: truck 字段名: driver_id => 对应表: driver
 *
 * @author tianyuzhu
 * @email 1659770218@QQ.COM
 * @date 2020-12-11 15:52:12
 */
@Data
@TableName("contact")
@ApiModel("车辆司机关联表: 用于连接车辆与驾驶员")
public class ContactEntity implements Serializable {
  private static final long serialVersionUID = 1L;

  /** 联系编号(自增) */
  @Null(
      message = "新增时ID不能携带",
      groups = {SaveGroup.class})
  @ApiModelProperty("联系编号(自增)")
  @TableId(value = "contact_id", type = IdType.AUTO)
  private Long contactId;
  /** 车辆编号 */
  @NotNull(
      message = "车辆编号不能为空",
      groups = {SaveGroup.class})
  @ApiModelProperty("车辆编号")
  private Long truckId;
  /** 驾驶员编号 */
  @NotNull(
      message = "驾驶员编号不能为空",
      groups = {SaveGroup.class})
  @ApiModelProperty("驾驶员编号")
  private Long driverId;
}
